<template>
  <el-table-column
    :prop="field.options.id"
    :label="field.options.tableLabel"
    :width="field.options.colWidth"
    :align="field.options.tableAlign"
    :show-overflow-tooltip="field.options.showOverflowTooltip"
  >
    <div slot="header" class="theme_table_col">
      {{ field.options.tableLabel }}
      <el-tooltip
        v-if="hasLabelIcon"
        :content="field.options.labelTooltip"
        effect="light"
      >
        <i :class="field.options.labelIconClass" />
      </el-tooltip>
    </div>
    <!-- <template> -->
    <slot />
    <!-- </template> -->
  </el-table-column>
</template>

<script>
/* eslint-disable vue/require-default-prop */
/* eslint-disable eol-last */
export default {
  name: "table-col-wrapper",
  props: {
    field: Object,
    designer: Object,
    parentId: String,
    designState: {
      type: Boolean,
      default: false,
    },
  },
  computed: {
    hasLabelIcon: {
      cache: false,
      get() {
        return (
          !!this.field.options.labelIconClass &&
          !!this.field.options.labelTooltip
        );
      },
    },
  },
  mounted() {},
  methods: {},
};
</script>

<style lang="scss" scoped>
@import "../../../../../../styles/global.scss"; //* form-item-wrapper已引入，还需要重复引入吗？ *//
</style>
